package cn.edu.sjtu.literature.db.mapping;

import java.sql.ResultSet;
import java.sql.SQLException;

import cn.edu.sjtu.literature.entity.Category;

public class CategoryResultMappingCallback implements ResultMappingCallback<Category> {

	@Override
	public Category doResultMapping(ResultSet rs) throws SQLException {
		Category category = new Category();
		category.setId(rs.getInt("id"));
		category.setName(rs.getString("name"));
		return category;
	}

}
